<template>
  <div class="GameViewVue imgBgGlobal" :id="clsid">
    <div class="view">
      <router-view/>
      <!--<BottomPanel></BottomPanel>-->
    </div>

  </div>
</template>

<style scoped>
.GameViewVue{
  position: absolute;width: 100%;height:100%;overflow: hidden;
}
.view{
  position:absolute;width: 100%;height:100%;overflow: hidden;
}


</style>

<script setup>
import Enum from "@/gamejs/Enum";
import {useRoute, useRouter} from 'vue-router';
import {
  ref,
  onMounted,
  onUnmounted, watch, computed,
} from "vue";
import { useStore} from 'vuex';


import Util from "@/gamejs/Util";
import BottomPanel from "@/views/panel/BottomPanel";
import layPicker from "@/gamejs/lay-picker";
let store = useStore();
let clsid=winApp.getClsId();
let router = useRouter();
/*组件挂载完成后执行的函数；*/
onMounted(() => {

  console.log("GameViewVue onMounted");//setTimeout
  if(Util.GetUrlParam('recdid')!=''){
    router.push({ path:Enum.paiPanXinxiPanelpath, query: {recdid:Util.GetUrlParam('recdid')}});
  }

});



onUnmounted(() => {
  //卸载组件实例后调用,调用此钩子时,组件实例的所有指令都被解除绑定,所有事件侦听器都被移除,所有子组件实例被卸载。
  winApp.deleteNotification(clsid);
  // console.log("onUnmounted  卸载组件实例后 destroyed",clsid);
});



let route = useRoute();
let routePath_status=computed(()=>{return route.path;});
watch(routePath_status,(newValue,oldValue)=>{
  console.log("GameViewVue watch  routePath_status ",route.path);
  store.state.view.routerPath=route.path;
});



</script>
